package cz.spock.core.entity.registration;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;

import com.google.appengine.api.datastore.Email;
import com.googlecode.objectify.Key;

import cz.spock.core.entity.Account;

/**
 * Object of class Registration represents registration request.
 * 
 * Prepared for Objectify.
 * 
 * @author miso
 *
 */
@Entity
public class Registration {
	
    @Id
    private Long id;
    
	private Email email;
	
	private String link;
	
	private boolean validLink;
	
	private Date validUntil;
	
	private Date created;
	
	private Key<Account> invitedBy;
	
	private String accountType;

    public Email getEmail() {
        return email;
    }

    public void setEmail(Email email) {
        this.email = email;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public boolean isValidLink() {
        return validLink;
    }

    public void setValidLink(boolean validLink) {
        this.validLink = validLink;
    }

    public Date getValidUntil() {
        return validUntil;
    }

    public void setValidUntil(Date validUntil) {
        this.validUntil = validUntil;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public String getAccountType() {
        return accountType;
    }

    public void setAccountType(String accountType) {
        this.accountType = accountType;
    }

    public Long getId() {
        return id;
    }

    public Key<Account> getInvitedBy() {
        return invitedBy;
    }

    public void setInvitedBy(Key<Account> invitedBy) {
        this.invitedBy = invitedBy;
    }

    public void setId(Long id) {
        this.id = id;
    }

}
